<?php
/************************FoxPHP威客系统************************/
/*                                                            */
/*  FoxPHP.Com (C)2006-2016 FoxPHP Inc.                       */
/*  This is NOT a freeware, use is subject to license terms   */
/*  FoxPHP威客系统是商业软件,使用于商业用途请购买授权         */
/*  V3.0 2016.3                                               */
/*  foxphp@aliyun.com                                         */
/*  http://www.foxphp.com                                     */
/*                                                            */
/**************************************************************/

namespace Admin\Controller;
use Think\Controller;
class EvaluationController extends IndexController {
	
	//列表动作-----------------------------------------------------------------------------------------------
	public function indexAction(){

		$sqlwhere=array(' process=%d ',array('process'=>1));
	
		$model=new \Admin\Model\DataOrderModel();
		foreach($model->IndexGetData(
				//排序
				array(
					array('order'=>'id','name'=>'ID'),
					array('order'=>'oid','name'=>'稿件ID'),
					array('order'=>'subject','name'=>'标题'),
					array('order'=>'buyer_evaluate_time','name'=>'买家评价时间'),
					array('order'=>'buyer_uid','name'=>'买家UID'),
					array('order'=>'buyer_username','name'=>'买家用户名'),
					array('order'=>'buyer_evaluate','name'=>'买家评价'),
					array('order'=>'buyer_evaluate_content','name'=>'买家评价内容'),
					
					array('order'=>'seller_evaluate_time','name'=>'买家评价时间'),
					array('order'=>'seller_uid','name'=>'买家UID'),
					array('order'=>'seller_username','name'=>'买家用户名'),
					array('order'=>'seller_evaluate','name'=>'买家评价'),
					array('order'=>'seller_evaluate_content','name'=>'买家评价内容'),
					
				),
				//查询
				array(	
					'id'=>array('id','int'),
					'oid'=>array('oid','int'),
					'buyer_uid'=>array('buyer_uid','int'),
					'seller_uid'=>array('seller_uid','int'),
					'subject'=>array('subject','search')
				)
				,
				'id DESC'
				,
				20				
				,
				$sqlwhere
				
			) as $key=>$value){
			$this->assign($key,$value);
		}

		$this->display();
	}
	
}